-
Notifications
You must be signed in to change notification settings - Fork 4
Make Road's transportCapacity attribute a real number
#280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if (i == std::ceil(transportCapacity) - 1) { | ||
| double integral; | ||
| double fractional = std::modf(transportCapacity, &integral); | ||
| if (fractional != 0. && uniformDist(this->m_generator) > fractional) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
| double integral; | ||
| double fractional = std::modf(transportCapacity, &integral); | ||
| if (fractional != 0. && uniformDist(this->m_generator) > fractional) { | ||
| bCanPass = false; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
time is Y2038-unsafe Note
| bArrived = true; | ||
| } else { | ||
| const auto agentId{pStreet->queue(queueIndex).front()}; | ||
| auto const& pAgent{this->agents().at(agentId)}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| } | ||
| if (destinationNode->isTrafficLight()) { | ||
| auto& tl = dynamic_cast<TrafficLight&>(*destinationNode); | ||
| auto const direction{pStreet->laneMapping().at(queueIndex)}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| continue; | ||
| } | ||
| } | ||
| if (!pAgent->isRandom()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
time is Y2038-unsafe Note
| } | ||
| } | ||
| if (!pAgent->isRandom()) { | ||
| if (destinationNode->id() == |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| if (!pAgent->isRandom()) { | ||
| if (destinationNode->id() == | ||
| this->itineraries().at(pAgent->itineraryId())->destination()) { | ||
| bArrived = true; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
time is Y2038-unsafe Note
| } | ||
| continue; | ||
| } | ||
| auto const& nextStreet{ |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| graph2.buildAdj(); | ||
| Dynamics dynamics{graph2, false, 69, 0., dsm::weight_functions::streetLength, 1.}; | ||
| dynamics.addItinerary(std::unique_ptr<Itinerary>(new Itinerary(0, 1))); | ||
| dynamics.updatePaths(); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
| Dynamics dynamics{graph2, false, 69, 0., dsm::weight_functions::streetLength, 1.}; | ||
| dynamics.addItinerary(std::unique_ptr<Itinerary>(new Itinerary(0, 1))); | ||
| dynamics.updatePaths(); | ||
| dynamics.addAgent(0, 0, 0); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #280 +/- ##
==========================================
+ Coverage 90.72% 90.95% +0.23%
==========================================
Files 36 36
Lines 5119 5153 +34
Branches 461 463 +2
==========================================
+ Hits 4644 4687 +43
+ Misses 475 466 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.